#!/bin/sh
while read file
do
  case "$1" in
    "C-d")
      mv "$file" ~/.trash ;;
    "C-r")
      convert -rotate 90 "$file" "$file" ;;
    "C-c")
      echo -n "$file" | xclip -selection clipboard ;;
    "C-w 0")
      nitrogen --save --set-zoom-fill --head=0 "$file" ;;
    "C-w 1")
      nitrogen --save --set-zoom-fill --head=1 "$file" ;;
  esac
done
